package com.xiaobai.server.controller;

import com.xiaobai.server.feign.UserService;
import entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author yangdaji
 * @version 1.0 @Description: 视频rest
 * @date 22-1-23 下午 10:57
 */
@Slf4j
@RestController
@RequestMapping("vid")
public class VideController {

    /** 用户service */
    @Autowired private UserService userService;

    /**
     * @param userId
     * @return
     */
    @RequestMapping("/getVide")
    public List<User> getUser(String userId) {

        List<User> user1 = userService.getUser(userId);
        log.info("获取的用户信息:{}", user1);
        return user1;
    }

    /** @return */
    @RequestMapping("/test")
    public String test() {
        return "处理方法返回" + 9003;
    }
}
